var BaseUserIndex = app.controller('BaseUserIndex', function($rootScope,$stateParams, $scope, $http,$state,$timeout,$cordovaDevice,$cordovaChat,BaseUserIndexData) {
	try{
		$rootScope.showf=false;
		$scope.title="个人信息";
		$scope.info={};
		var url=SITE_URL+"index.php?app=baseapp&act=memberinfo&callback=JSON_CALLBACK&id="+$stateParams.id;
		$http.jsonp(url).success( function(data) {
			if(data.done){
				$scope.info=data.retval;
			}
		});		
	}
	catch (e) {
		showcatch(e);
	}
});
BaseUserIndex.BaseUserIndexData=function($q, $http,$stateParams,$rootScope){
	try {
		var data = [];
		var def = $q.defer();
		if(window.localStorage.u==undefined||window.localStorage.u==null||window.localStorage.u==""){			
			$rootScope.go("loginmain");
		}else{
			def.resolve(data);
		}
		
		return def.promise;
	} catch (e) {
		showcatch(e);
	}
}